<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GtkExpander</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="GTK+ 2 Reference Manual">
<link rel="up" href="LayoutContainers.html" title="Layout Containers">
<link rel="prev" href="GtkTable.html" title="GtkTable">
<link rel="next" href="gtk-Orientable.html" title="GtkOrientable">
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="GtkTable.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="LayoutContainers.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GTK+ 2 Reference Manual</th>
<td><a accesskey="n" href="gtk-Orientable.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#GtkExpander.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#GtkExpander.description" class="shortcut">Description</a>
                   | 
                  <a href="#GtkExpander.object-hierarchy" class="shortcut">Object Hierarchy</a>
                   | 
                  <a href="#GtkExpander.implemented-interfaces" class="shortcut">Implemented Interfaces</a>
                   | 
                  <a href="#GtkExpander.properties" class="shortcut">Properties</a>
                   | 
                  <a href="#GtkExpander.style-properties" class="shortcut">Style Properties</a>
                   | 
                  <a href="#GtkExpander.signals" class="shortcut">Signals</a>
</td></tr>
</table>
<div class="refentry">
<a name="GtkExpander"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="GtkExpander.top_of_page"></a>GtkExpander</span></h2>
<p>GtkExpander — A container which can hide its child</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="GtkExpander.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include &lt;gtk/gtk.h&gt;

struct              <a class="link" href="GtkExpander.html#GtkExpander-struct" title="struct GtkExpander">GtkExpander</a>;
<a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *         <a class="link" href="GtkExpander.html#gtk-expander-new" title="gtk_expander_new ()">gtk_expander_new</a>                    (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *label</code></em>);
<a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *         <a class="link" href="GtkExpander.html#gtk-expander-new-with-mnemonic" title="gtk_expander_new_with_mnemonic ()">gtk_expander_new_with_mnemonic</a>      (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *label</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="GtkExpander.html#gtk-expander-set-expanded" title="gtk_expander_set_expanded ()">gtk_expander_set_expanded</a>           (<em class="parameter"><code><a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a> *expander</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> expanded</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="GtkExpander.html#gtk-expander-get-expanded" title="gtk_expander_get_expanded ()">gtk_expander_get_expanded</a>           (<em class="parameter"><code><a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a> *expander</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="GtkExpander.html#gtk-expander-set-spacing" title="gtk_expander_set_spacing ()">gtk_expander_set_spacing</a>            (<em class="parameter"><code><a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a> *expander</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> spacing</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>                <a class="link" href="GtkExpander.html#gtk-expander-get-spacing" title="gtk_expander_get_spacing ()">gtk_expander_get_spacing</a>            (<em class="parameter"><code><a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a> *expander</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="GtkExpander.html#gtk-expander-set-label" title="gtk_expander_set_label ()">gtk_expander_set_label</a>              (<em class="parameter"><code><a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a> *expander</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *label</code></em>);
const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *       <a class="link" href="GtkExpander.html#gtk-expander-get-label" title="gtk_expander_get_label ()">gtk_expander_get_label</a>              (<em class="parameter"><code><a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a> *expander</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="GtkExpander.html#gtk-expander-set-use-underline" title="gtk_expander_set_use_underline ()">gtk_expander_set_use_underline</a>      (<em class="parameter"><code><a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a> *expander</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> use_underline</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="GtkExpander.html#gtk-expander-get-use-underline" title="gtk_expander_get_use_underline ()">gtk_expander_get_use_underline</a>      (<em class="parameter"><code><a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a> *expander</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="GtkExpander.html#gtk-expander-set-use-markup" title="gtk_expander_set_use_markup ()">gtk_expander_set_use_markup</a>         (<em class="parameter"><code><a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a> *expander</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> use_markup</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="GtkExpander.html#gtk-expander-get-use-markup" title="gtk_expander_get_use_markup ()">gtk_expander_get_use_markup</a>         (<em class="parameter"><code><a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a> *expander</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="GtkExpander.html#gtk-expander-set-label-widget" title="gtk_expander_set_label_widget ()">gtk_expander_set_label_widget</a>       (<em class="parameter"><code><a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a> *expander</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *label_widget</code></em>);
<a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *         <a class="link" href="GtkExpander.html#gtk-expander-get-label-widget" title="gtk_expander_get_label_widget ()">gtk_expander_get_label_widget</a>       (<em class="parameter"><code><a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a> *expander</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="GtkExpander.html#gtk-expander-set-label-fill" title="gtk_expander_set_label_fill ()">gtk_expander_set_label_fill</a>         (<em class="parameter"><code><a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a> *expander</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> label_fill</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="GtkExpander.html#gtk-expander-get-label-fill" title="gtk_expander_get_label_fill ()">gtk_expander_get_label_fill</a>         (<em class="parameter"><code><a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a> *expander</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="GtkExpander.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
  <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
   +----<a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GInitiallyUnowned">GInitiallyUnowned</a>
         +----<a class="link" href="GtkObject.html" title="GtkObject">GtkObject</a>
               +----<a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a>
                     +----<a class="link" href="GtkContainer.html" title="GtkContainer">GtkContainer</a>
                           +----<a class="link" href="GtkBin.html" title="GtkBin">GtkBin</a>
                                 +----GtkExpander
</pre>
</div>
<div class="refsect1">
<a name="GtkExpander.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
<p>
GtkExpander implements
 AtkImplementorIface and  <a class="link" href="GtkBuildable.html" title="GtkBuildable">GtkBuildable</a>.</p>
</div>
<div class="refsect1">
<a name="GtkExpander.properties"></a><h2>Properties</h2>
<pre class="synopsis">
  "<a class="link" href="GtkExpander.html#GtkExpander--expanded" title='The "expanded" property'>expanded</a>"                 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read / Write / Construct
  "<a class="link" href="GtkExpander.html#GtkExpander--label" title='The "label" property'>label</a>"                    <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>*                : Read / Write / Construct
  "<a class="link" href="GtkExpander.html#GtkExpander--label-fill" title='The "label-fill" property'>label-fill</a>"               <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read / Write / Construct
  "<a class="link" href="GtkExpander.html#GtkExpander--label-widget" title='The "label-widget" property'>label-widget</a>"             <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a>*            : Read / Write
  "<a class="link" href="GtkExpander.html#GtkExpander--spacing" title='The "spacing" property'>spacing</a>"                  <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a>                  : Read / Write
  "<a class="link" href="GtkExpander.html#GtkExpander--use-markup" title='The "use-markup" property'>use-markup</a>"               <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read / Write / Construct
  "<a class="link" href="GtkExpander.html#GtkExpander--use-underline" title='The "use-underline" property'>use-underline</a>"            <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read / Write / Construct
</pre>
</div>
<div class="refsect1">
<a name="GtkExpander.style-properties"></a><h2>Style Properties</h2>
<pre class="synopsis">
  "<a class="link" href="GtkExpander.html#GtkExpander--s-expander-size" title='The "expander-size" style property'>expander-size</a>"            <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a>                  : Read
  "<a class="link" href="GtkExpander.html#GtkExpander--s-expander-spacing" title='The "expander-spacing" style property'>expander-spacing</a>"         <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a>                  : Read
</pre>
</div>
<div class="refsect1">
<a name="GtkExpander.signals"></a><h2>Signals</h2>
<pre class="synopsis">
  "<a class="link" href="GtkExpander.html#GtkExpander-activate" title='The "activate" signal'>activate</a>"                                       : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-ACTION:CAPS"><code class="literal">Action</code></a>
</pre>
</div>
<div class="refsect1">
<a name="GtkExpander.description"></a><h2>Description</h2>
<p>
A <a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a> allows the user to hide or show its child by clicking
on an expander triangle similar to the triangles used in a <a class="link" href="GtkTreeView.html" title="GtkTreeView"><span class="type">GtkTreeView</span></a>.
</p>
<p>
Normally you use an expander as you would use any other descendant
of <a class="link" href="GtkBin.html" title="GtkBin"><span class="type">GtkBin</span></a>; you create the child widget and use <a class="link" href="GtkContainer.html#gtk-container-add" title="gtk_container_add ()"><code class="function">gtk_container_add()</code></a>
to add it to the expander. When the expander is toggled, it will take
care of showing and hiding the child automatically.
</p>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="expander-special-usage"></a>Special Usage</h2></div></div></div>
<p>
There are situations in which you may prefer to show and hide the
expanded widget yourself, such as when you want to actually create
the widget at expansion time. In this case, create a <a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a>
but do not add a child to it. The expander widget has an
<code class="literal">expanded</code> property which can be used to monitor
its expansion state. You should watch this property with a signal
connection as follows:
</p>
<a name="expander-callback-example"></a><pre class="programlisting">
expander = gtk_expander_new_with_mnemonic ("_More Options");
g_signal_connect (expander, "notify::expanded",
                  G_CALLBACK (expander_callback), NULL);
...
static void
expander_callback (GObject    *object,
                   GParamSpec *param_spec,
                   gpointer    user_data)
{
  GtkExpander *expander;
  expander = GTK_EXPANDER (object);
  if (gtk_expander_get_expanded (expander))
    {
      /* Show or create widgets */
    }
  else
    {
      /* Hide or destroy widgets */
    }
}
</pre>
</div>
<div class="refsect2">
<a name="GtkExpander-BUILDER-UI"></a><h3>GtkExpander as GtkBuildable</h3>
<p>
The GtkExpander implementation of the GtkBuildable interface
supports placing a child in the label position by specifying
"label" as the "type" attribute of a &lt;child&gt; element.
A normal content child can be specified without specifying
a &lt;child&gt; type attribute.
</p>
<div class="example">
<a name="id1147503"></a><p class="title"><b>Example 47. A UI definition fragment with GtkExpander</b></p>
<div class="example-contents">
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
    <tbody>
      <tr>
        <td class="listing_lines" align="right"><pre>1
2
3
4
5
6
7
8</pre></td>
        <td class="listing_code"><pre class="programlisting"><span class="symbol">&lt;</span><span class="usertype">object</span><span class="normal"> class</span><span class="symbol">=</span><span class="string">"GtkExpander"</span><span class="symbol">&gt;</span>
<span class="normal">  </span><span class="symbol">&lt;</span><span class="usertype">child</span><span class="normal"> type</span><span class="symbol">=</span><span class="string">"label"</span><span class="symbol">&gt;</span>
<span class="normal">    </span><span class="symbol">&lt;</span><span class="usertype">object</span><span class="normal"> class</span><span class="symbol">=</span><span class="string">"GtkLabel"</span><span class="normal"> id</span><span class="symbol">=</span><span class="string">"expander-label"</span><span class="symbol">/&gt;</span>
<span class="normal">  </span><span class="symbol">&lt;/</span><span class="normal">child</span><span class="symbol">&gt;</span>
<span class="normal">  </span><span class="symbol">&lt;</span><span class="normal">child</span><span class="symbol">&gt;</span>
<span class="normal">    </span><span class="symbol">&lt;</span><span class="usertype">object</span><span class="normal"> class</span><span class="symbol">=</span><span class="string">"GtkEntry"</span><span class="normal"> id</span><span class="symbol">=</span><span class="string">"expander-content"</span><span class="symbol">/&gt;</span>
<span class="normal">  </span><span class="symbol">&lt;/</span><span class="normal">child</span><span class="symbol">&gt;</span>
<span class="symbol">&lt;/</span><span class="normal">object</span><span class="symbol">&gt;</span></pre></td>
      </tr>
    </tbody>
  </table>
</div>

</div>
<br class="example-break">
</div>
</div>
<div class="refsect1">
<a name="GtkExpander.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="GtkExpander-struct"></a><h3>struct GtkExpander</h3>
<pre class="programlisting">struct GtkExpander;</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-expander-new"></a><h3>gtk_expander_new ()</h3>
<pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *         gtk_expander_new                    (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *label</code></em>);</pre>
<p>
Creates a new expander using <em class="parameter"><code>label</code></em> as the text of the label.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>label</code></em> :</span></p></td>
<td>the text of the label</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a new <a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a> widget.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-expander-new-with-mnemonic"></a><h3>gtk_expander_new_with_mnemonic ()</h3>
<pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *         gtk_expander_new_with_mnemonic      (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *label</code></em>);</pre>
<p>
Creates a new expander using <em class="parameter"><code>label</code></em> as the text of the label.
If characters in <em class="parameter"><code>label</code></em> are preceded by an underscore, they are underlined.
If you need a literal underscore character in a label, use '__' (two 
underscores). The first underlined character represents a keyboard 
accelerator called a mnemonic.
Pressing Alt and that key activates the button.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>label</code></em> :</span></p></td>
<td>the text of the label with an underscore in front of the
mnemonic character. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a new <a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a> widget.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-expander-set-expanded"></a><h3>gtk_expander_set_expanded ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_expander_set_expanded           (<em class="parameter"><code><a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a> *expander</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> expanded</code></em>);</pre>
<p>
Sets the state of the expander. Set to <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, if you want
the child widget to be revealed, and <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if you want the
child widget to be hidden.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>expander</code></em> :</span></p></td>
<td>a <a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>expanded</code></em> :</span></p></td>
<td>whether the child widget is revealed</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-expander-get-expanded"></a><h3>gtk_expander_get_expanded ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gtk_expander_get_expanded           (<em class="parameter"><code><a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a> *expander</code></em>);</pre>
<p>
Queries a <a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a> and returns its current state. Returns <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>
if the child widget is revealed.
</p>
<p>
See <a class="link" href="GtkExpander.html#gtk-expander-set-expanded" title="gtk_expander_set_expanded ()"><code class="function">gtk_expander_set_expanded()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>expander</code></em> :</span></p></td>
<td>a <a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the current state of the expander.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-expander-set-spacing"></a><h3>gtk_expander_set_spacing ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_expander_set_spacing            (<em class="parameter"><code><a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a> *expander</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> spacing</code></em>);</pre>
<p>
Sets the spacing field of <em class="parameter"><code>expander</code></em>, which is the number of pixels to
place between expander and the child.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>expander</code></em> :</span></p></td>
<td>a <a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>spacing</code></em> :</span></p></td>
<td>distance between the expander and child in pixels.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-expander-get-spacing"></a><h3>gtk_expander_get_spacing ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>                gtk_expander_get_spacing            (<em class="parameter"><code><a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a> *expander</code></em>);</pre>
<p>
Gets the value set by <a class="link" href="GtkExpander.html#gtk-expander-set-spacing" title="gtk_expander_set_spacing ()"><code class="function">gtk_expander_set_spacing()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>expander</code></em> :</span></p></td>
<td>a <a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>spacing between the expander and child.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-expander-set-label"></a><h3>gtk_expander_set_label ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_expander_set_label              (<em class="parameter"><code><a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a> *expander</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *label</code></em>);</pre>
<p>
Sets the text of the label of the expander to <em class="parameter"><code>label</code></em>.
</p>
<p>
This will also clear any previously set labels.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>expander</code></em> :</span></p></td>
<td>a <a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>label</code></em> :</span></p></td>
<td>a string. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-expander-get-label"></a><h3>gtk_expander_get_label ()</h3>
<pre class="programlisting">const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *       gtk_expander_get_label              (<em class="parameter"><code><a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a> *expander</code></em>);</pre>
<p>
Fetches the text from a label widget including any embedded
underlines indicating mnemonics and Pango markup, as set by
<a class="link" href="GtkExpander.html#gtk-expander-set-label" title="gtk_expander_set_label ()"><code class="function">gtk_expander_set_label()</code></a>. If the label text has not been set the
return value will be <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. This will be the case if you create an
empty button with <a class="link" href="GtkButton.html#gtk-button-new" title="gtk_button_new ()"><code class="function">gtk_button_new()</code></a> to use as a container.
</p>
<p>
Note that this function behaved differently in versions prior to
2.14 and used to return the label text stripped of embedded
underlines indicating mnemonics and Pango markup. This problem can
be avoided by fetching the label text directly from the label
widget.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>expander</code></em> :</span></p></td>
<td>a <a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The text of the label widget. This string is owned
by the widget and must not be modified or freed.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-expander-set-use-underline"></a><h3>gtk_expander_set_use_underline ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_expander_set_use_underline      (<em class="parameter"><code><a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a> *expander</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> use_underline</code></em>);</pre>
<p>
If true, an underline in the text of the expander label indicates
the next character should be used for the mnemonic accelerator key.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>expander</code></em> :</span></p></td>
<td>a <a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>use_underline</code></em> :</span></p></td>
<td>
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if underlines in the text indicate mnemonics</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-expander-get-use-underline"></a><h3>gtk_expander_get_use_underline ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gtk_expander_get_use_underline      (<em class="parameter"><code><a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a> *expander</code></em>);</pre>
<p>
Returns whether an embedded underline in the expander label indicates a
mnemonic. See <a class="link" href="GtkExpander.html#gtk-expander-set-use-underline" title="gtk_expander_set_use_underline ()"><code class="function">gtk_expander_set_use_underline()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>expander</code></em> :</span></p></td>
<td>a <a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if an embedded underline in the expander label
indicates the mnemonic accelerator keys.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-expander-set-use-markup"></a><h3>gtk_expander_set_use_markup ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_expander_set_use_markup         (<em class="parameter"><code><a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a> *expander</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> use_markup</code></em>);</pre>
<p>
Sets whether the text of the label contains markup in <GTKDOCLINK HREF="PangoMarkupFormat">Pango's text markup
language</GTKDOCLINK>. See <a class="link" href="GtkLabel.html#gtk-label-set-markup" title="gtk_label_set_markup ()"><code class="function">gtk_label_set_markup()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>expander</code></em> :</span></p></td>
<td>a <a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>use_markup</code></em> :</span></p></td>
<td>
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the label's text should be parsed for markup</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-expander-get-use-markup"></a><h3>gtk_expander_get_use_markup ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gtk_expander_get_use_markup         (<em class="parameter"><code><a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a> *expander</code></em>);</pre>
<p>
Returns whether the label's text is interpreted as marked up with
the <GTKDOCLINK HREF="PangoMarkupFormat">Pango text markup
language</GTKDOCLINK>. See <a class="link" href="GtkExpander.html#gtk-expander-set-use-markup" title="gtk_expander_set_use_markup ()"><code class="function">gtk_expander_set_use_markup()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>expander</code></em> :</span></p></td>
<td>a <a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the label's text will be parsed for markup</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-expander-set-label-widget"></a><h3>gtk_expander_set_label_widget ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_expander_set_label_widget       (<em class="parameter"><code><a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a> *expander</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *label_widget</code></em>);</pre>
<p>
Set the label widget for the expander. This is the widget
that will appear embedded alongside the expander arrow.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>expander</code></em> :</span></p></td>
<td>a <a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>label_widget</code></em> :</span></p></td>
<td>the new label widget. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-expander-get-label-widget"></a><h3>gtk_expander_get_label_widget ()</h3>
<pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *         gtk_expander_get_label_widget       (<em class="parameter"><code><a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a> *expander</code></em>);</pre>
<p>
Retrieves the label widget for the frame. See
<a class="link" href="GtkExpander.html#gtk-expander-set-label-widget" title="gtk_expander_set_label_widget ()"><code class="function">gtk_expander_set_label_widget()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>expander</code></em> :</span></p></td>
<td>a <a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the label widget,
or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if there is none. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-expander-set-label-fill"></a><h3>gtk_expander_set_label_fill ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_expander_set_label_fill         (<em class="parameter"><code><a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a> *expander</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> label_fill</code></em>);</pre>
<p>
Sets whether the label widget should fill all available horizontal space
allocated to <em class="parameter"><code>expander</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>expander</code></em> :</span></p></td>
<td>a <a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>label_fill</code></em> :</span></p></td>
<td>
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the label should should fill all available horizontal
space</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.22</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-expander-get-label-fill"></a><h3>gtk_expander_get_label_fill ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gtk_expander_get_label_fill         (<em class="parameter"><code><a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a> *expander</code></em>);</pre>
<p>
Returns whether the label widget will fill all available horizontal
space allocated to <em class="parameter"><code>expander</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>expander</code></em> :</span></p></td>
<td>a <a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the label widget will fill all available horizontal
space</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.22</p>
</div>
</div>
<div class="refsect1">
<a name="GtkExpander.property-details"></a><h2>Property Details</h2>
<div class="refsect2">
<a name="GtkExpander--expanded"></a><h3>The <code class="literal">"expanded"</code> property</h3>
<pre class="programlisting">  "expanded"                 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read / Write / Construct</pre>
<p>Whether the expander has been opened to reveal the child widget.</p>
<p>Default value: FALSE</p>
</div>
<hr>
<div class="refsect2">
<a name="GtkExpander--label"></a><h3>The <code class="literal">"label"</code> property</h3>
<pre class="programlisting">  "label"                    <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>*                : Read / Write / Construct</pre>
<p>Text of the expander's label.</p>
<p>Default value: NULL</p>
</div>
<hr>
<div class="refsect2">
<a name="GtkExpander--label-fill"></a><h3>The <code class="literal">"label-fill"</code> property</h3>
<pre class="programlisting">  "label-fill"               <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read / Write / Construct</pre>
<p>Whether the label widget should fill all available horizontal space.</p>
<p>Default value: FALSE</p>
</div>
<hr>
<div class="refsect2">
<a name="GtkExpander--label-widget"></a><h3>The <code class="literal">"label-widget"</code> property</h3>
<pre class="programlisting">  "label-widget"             <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a>*            : Read / Write</pre>
<p>A widget to display in place of the usual expander label.</p>
</div>
<hr>
<div class="refsect2">
<a name="GtkExpander--spacing"></a><h3>The <code class="literal">"spacing"</code> property</h3>
<pre class="programlisting">  "spacing"                  <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a>                  : Read / Write</pre>
<p>Space to put between the label and the child.</p>
<p>Allowed values: &gt;= 0</p>
<p>Default value: 0</p>
</div>
<hr>
<div class="refsect2">
<a name="GtkExpander--use-markup"></a><h3>The <code class="literal">"use-markup"</code> property</h3>
<pre class="programlisting">  "use-markup"               <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read / Write / Construct</pre>
<p>The text of the label includes XML markup. See pango_parse_markup().</p>
<p>Default value: FALSE</p>
</div>
<hr>
<div class="refsect2">
<a name="GtkExpander--use-underline"></a><h3>The <code class="literal">"use-underline"</code> property</h3>
<pre class="programlisting">  "use-underline"            <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read / Write / Construct</pre>
<p>If set, an underline in the text indicates the next character should be used for the mnemonic accelerator key.</p>
<p>Default value: FALSE</p>
</div>
</div>
<div class="refsect1">
<a name="GtkExpander.style-property-details"></a><h2>Style Property Details</h2>
<div class="refsect2">
<a name="GtkExpander--s-expander-size"></a><h3>The <code class="literal">"expander-size"</code> style property</h3>
<pre class="programlisting">  "expander-size"            <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a>                  : Read</pre>
<p>Size of the expander arrow.</p>
<p>Allowed values: &gt;= 0</p>
<p>Default value: 10</p>
</div>
<hr>
<div class="refsect2">
<a name="GtkExpander--s-expander-spacing"></a><h3>The <code class="literal">"expander-spacing"</code> style property</h3>
<pre class="programlisting">  "expander-spacing"         <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a>                  : Read</pre>
<p>Spacing around expander arrow.</p>
<p>Allowed values: &gt;= 0</p>
<p>Default value: 2</p>
</div>
</div>
<div class="refsect1">
<a name="GtkExpander.signal-details"></a><h2>Signal Details</h2>
<div class="refsect2">
<a name="GtkExpander-activate"></a><h3>The <code class="literal">"activate"</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                user_function                      (<a class="link" href="GtkExpander.html" title="GtkExpander"><span class="type">GtkExpander</span></a> *expander,
                                                        <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>     user_data)      : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-ACTION:CAPS"><code class="literal">Action</code></a></pre>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>expander</code></em> :</span></p></td>
<td>the object which received the signal.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.18</div>
</body>
</html>